package com.basswold.nasaesa.client;

public class GridSquare {
	public GridSquare(int newX, int newY) {
		this.x = newX;
		this.y = newY;
		this.module = -1;
	}

	public int getX() {
		return this.x;
	}

	public int getY() {
		return this.y;
	}

	public void setUsable(boolean usability) {
		this.usable = usability;
	}

	public boolean getUsable() {
		return this.usable;
	}

	public boolean setModuleID(int id) {
		boolean module = false;
		if ((getUsable() == true) && (this.module <= 0)) {
			module = true;
			this.module = id;
		}
		return module;
	}

	public void unsetModule() {
		this.module = -1;
	}

	public int getModuleID() {
		return this.module;
	}

	private int module;
	private boolean usable;
	private int x;
	private int y;
}
